package com.meta.platform.contract.core.repository.impl;

import com.meta.platform.contract.core.mapper.ContractInvoiceMapper;
import com.meta.platform.contract.domain.tunnel.db.ContractInvoiceRepository;
import com.meta.platform.contract.intf.entity.ContractInvoice;
import com.meta.platform.contract.intf.ro.ContractInvoiceRo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 合同发票表
 *
 * @Title: ContractInvoiceRepositoryImpl
 * @Author: M.simple
 * @Remark: The modified content
 * @CreateDate: 2020-12-08 15:53:38
 * @Version: v2.0
 */
@Service
public class ContractInvoiceRepositoryImpl implements ContractInvoiceRepository {

    @Autowired
    private ContractInvoiceMapper contractInvoiceMapper;

    /**
     * insert contractInvoice info
     *
     * @param contractInvoice:
     * @return void
     * @method insertContractInvoice
     * @author M.simple
     * @date 2020-12-08 15:53:38
     */
    @Override
    public void insertContractInvoice(ContractInvoice contractInvoice) {
        contractInvoiceMapper.insertContractInvoice(contractInvoice);
    }

    /**
     * batch insert contractInvoice info
     *
     * @param contractInvoices:
     * @return void
     * @method insertContractInvoice
     * @author M.simple
     * @date 2020-12-08 15:53:38
     */
    @Override
    public void batchInsertContractInvoice(List<ContractInvoice> contractInvoices) {
        contractInvoiceMapper.batchInsertContractInvoice(contractInvoices);
    }

    /**
     * update contractInvoice info
     *
     * @param contractInvoice:
     * @return int
     * @method updateContractInvoice
     * @author M.simple
     * @date 2020-12-08 15:53:38
     */
    @Override
    public int updateContractInvoice(ContractInvoice contractInvoice) {
        return contractInvoiceMapper.updateContractInvoice(contractInvoice);
    }

    /**
     * update contractInvoice info by Pk
     *
     * @param contractInvoice:
     * @return int
     * @method updateContractInvoiceByPk
     * @author M.simple
     * @date 2020-12-08 15:53:38
     */
    @Override
    public int updateContractInvoiceByPk(ContractInvoice contractInvoice) {
        return contractInvoiceMapper.updateContractInvoiceByPk(contractInvoice);
    }

    /**
     * list contractInvoice info
     *
     * @param contractInvoice:
     * @return List<ContractInvoice>
     * @method listContractInvoice
     * @author M.simple
     * @date 2020-12-08 15:53:38
     */
    @Override
    public List<ContractInvoice> listContractInvoice(ContractInvoiceRo contractInvoice) {
        return contractInvoiceMapper.listContractInvoice(contractInvoice);
    }

}
